<template>
  <BaseTable
    :data-source="userData"
    :columns="columns"
    @handleAdd="handleAddUser"
    @handleDelete="handleDeleteUser"
  />
</template>

<script setup lang="ts">
import { ref } from 'vue';
import BaseTable from './baseTable.vue';

const userData = ref([
  { id: 1, name: 'User 1' },
  { id: 2, name: 'User 2' },
]);

const columns = [
  { title: 'ID', dataIndex: 'id' },
  { title: 'Name', dataIndex: 'name' },
];

const handleAddUser = () => {
  console.log('Add user');
};

const handleDeleteUser = (ids: any[]) => {
  console.log('Delete users:', ids);
};
</script>
